package com.xmtlxx.wms.mapper;

import com.xmtlxx.common.core.mapper.BaseMapperPlus;
import com.xmtlxx.common.tengbo.vo.SmartCabinetPutProtVo;
import com.xmtlxx.wms.domain.PutDtl;
import com.xmtlxx.wms.domain.bo.PutDtlBo;
import com.xmtlxx.wms.domain.vo.PutDtlVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 上架任务明细Mapper接口
 *
 * @author xmtlxx
 * @date 2022-08-15
 */
public interface PutDtlMapper extends BaseMapperPlus<PutDtlMapper, PutDtl, PutDtlVo> {
    /**
     * 根据条件分页查询上架任务明细
     *
     * @param putDtl 上架任务明细
     * @return Page PutDtl
     */
//    @DataPermission({
//        @DataColumn(key = "tenantName", value = "p.create_by"),
//        @DataColumn(key = "deptName", value = "p.dept_id"),
//        @DataColumn(key = "userName", value = "p.create_by")
//    })
    Page<PutDtlVo> selectPagePutDtlList(@Param("page") Page<PutDtl> page,@Param("putDtl") PutDtlBo putDtl);

    /**
     * 查询上架任务明细列表
     *
     * @param putDtl 上架任务明细
     * @return 上架任务明细集合
     */
//    @DataPermission({
//        @DataColumn(key = "tenantName", value = "p.create_by"),
//        @DataColumn(key = "deptName", value = "p.dept_id"),
//        @DataColumn(key = "userName", value = "p.create_by")
//    })
    List<PutDtlVo> selectPutDtlList(@Param("putDtl") PutDtlBo putDtl);

    List<PutDtlVo> selectUpdateList(@Param("key") String key);

    PutDtlVo selectPutDtlVoByID(String id);

    List<SmartCabinetPutProtVo> smartCabinetGetProV2(String smartCabinetId);

    Long countCars(@Param("key") String key,@Param("carType") String carType);

    Long countProperties(String key);

    Boolean deleteVoById(String id);

    Boolean deleteByPutId(String id);
}
